package com.weiaibenpao.demo.chislim.service;

import com.weiaibenpao.demo.chislim.bean.AddInterestSportResult;
import com.weiaibenpao.demo.chislim.bean.AddSportResult;
import com.weiaibenpao.demo.chislim.bean.GetInterestSportResult;
import com.weiaibenpao.demo.chislim.bean.Li_MusicResult;
import com.weiaibenpao.demo.chislim.bean.Li_SportHistory_Result;
import com.weiaibenpao.demo.chislim.bean.Li_UserBeanResult;
import com.weiaibenpao.demo.chislim.bean.Li_UserInfoResult;
import com.weiaibenpao.demo.chislim.bean.Li_funsResult;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by lenovo on 2017/4/14.
 */

public interface MyService {
    //获取音乐列表
    @GET("/chislim6/music/musictype")
    Call<Li_MusicResult> getMusicList();

    //电话注册
    @GET("/chislim6/user/phoneRegister")
    Call<Li_UserBeanResult> getPhoneRegistResult(
            @Query("userPhone") String userPhone,
            @Query("registerSource") String registerSource,
            @Query("userPass") String userPass);

    //第三方注册
    @GET("/chislim6/user/threePartRegister")
    Call<Li_UserBeanResult> getThreeRegistResult(
            @Query("openId") String openId,
            @Query("registerSource") String registerSource,
            @Query("userImage") String userImage,
            @Query("userName") String userName,
            @Query("sex") String sex,
            @Query("userBirth") String userBirth);

    //电话登录
    @GET("/chislim6/user/loginByPhone")
    Call<Li_UserBeanResult> getLoginByPhone(
            @Query("userPhone") String userPhone,
            @Query("userPass") String userPass);

    //第三方登录
    @GET("/chislim6/user/loginByThreeType")
    Call<Li_UserBeanResult> getLoginByThree(
            @Query("openId") String openId,
            @Query("registerSource") String registerSource);

    //头像修改
    @GET("/chislim6/user/updateUserImage")
    Call<Li_UserBeanResult> updateUserImage(
            @Query("userID") int userID,
            @Query("userImage") String userImage);

    //修改密码
    @GET("/chislim6/user/updateUserPass")
    Call<Li_UserBeanResult> updateUserPass(
            @Query("userID") int userID,
            @Query("userPass") String userPass);

    //修改用户信息
    @GET("/chislim6/user/updateUserInfo")
    Call<Li_UserBeanResult> updateUserInfo(
            @Query("userID") int userID,
            @Query("userName") String userName,
            @Query("sex") String sex,
            @Query("userBirth") String userBirth,
            @Query("userEmail") String userEmail,
            @Query("userIntru") String userIntru,
            @Query("hobby") String hobby,
            @Query("userWeight") double userWeight,
            @Query("userHeigh") int userHeigh);


    //查询个人中心信息
    @GET("/chislim6/fans/minelist")
    Call<Li_UserInfoResult> getUserInfo(
            @Query("userId") int userId,
            @Query("nowUserId") int nowUserId);

    //查询个人的粉丝和关注的人的数
    @GET("/chislim6/fans/fanslist")
    Call<Li_funsResult> getUserFuns(
            @Query("userId") int userId,
            @Query("type") int type);

    //查询趣味跑信息
    @GET("/chislim6/interest/selectinterest")
    Call<GetInterestSportResult> GetInterestSportResult(
            @Query("userId") int userId);

    //添加趣味跑信息
    @GET("/chislim6/interest/addinterest")
    Call<AddInterestSportResult> AddInterestSportResult(
            @Query("userId") int userId,
            @Query("cityName") String cityName,
            @Query("finishPercent") String finishPercent,
            @Query("allDis") String allDis,
            @Query("nowDis") String nowDis,
            @Query("sportTime") String sportTime);

    //找回密码
    @GET("/chislim6/user/updatepassByPhone")
    Call<Li_UserBeanResult> FindUserPass(
            @Query("userPhone") String userPhone,
            @Query("userPass") String userPass);


    //添加运动记录

    /**
     * userId=43&
     * sportType=1&
     * altitudeHigh=0
     * &average=0&
     * boolPressure=0&
     * calories=asd&
     * heartRate=0&
     * matchNumber=0&
     * sportDate=asdasd&
     * sportImgUrl=asda&
     * totalDistance=3.3&
     * totalShin=0&
     * stepFrequency=10&
     * totalTime=1010&
     * totalStep=10
     * @param userId
     * @param sportType
     * @param altitudeHigh
     * @param average
     * @param boolPressure
     * @param calories
     * @param heartRate
     * @param matchNumber
     * @param sportDate
     * @param sportImgUrl
     * @param totalDistance
     * @param totalShin
     * @param stepFrequency
     * @param totalTime
     * @param totalStep
     * @return
     */
    @GET("/chislim6/sports/addsports")
    Call<AddSportResult> addSports(
            @Query("userId") int userId,
            @Query("sportType") int sportType,
            @Query("altitudeHigh") String altitudeHigh,
            @Query("average") String average,
            @Query("boolPressure") String boolPressure,
            @Query("calories") String calories,
            @Query("heartRate") String heartRate,
            @Query("matchNumber") String matchNumber,
            @Query("sportDate") String sportDate,
            @Query("sportImgUrl") String sportImgUrl,
            @Query("totalDistance") float totalDistance,
            @Query("totalShin") String totalShin,
            @Query("stepFrequency") String stepFrequency,
            @Query("totalTime") String totalTime,
            @Query("totalStep") String totalStep);

    //查询运动记录
    @GET("/chislim6/sports/list")
    Call<Li_SportHistory_Result> getUserSport(
            @Query("userId") int userId,
            @Query("sportType") int sportType,
            @Query("page") int page,
            @Query("size") int size);
}
